package cn.com.lutao.singleton.best;

/**
 * Created by LT on 2017-09-21.
 */
public class Singleton {
    private Singleton(){};
    private static class SingletonFactory{
        private static Singleton singleton = new Singleton();
    }
    public static Singleton getSingleton(){
        return SingletonFactory.singleton;
    }
    public Object readResolve(){
        return getSingleton();
    }
}
